<?php
namespace Home\Controller;

class CommonController extends EmptyController {
    // 在这里做登录验证
    public function _initialize(){
        if(empty(session('user'))){
            $this->redirect('Home/Login/index');
        }
    }
}